Skip to content

fix(core): ViewBase without layoutable parent, ScrollView clipToBounds - #19

Merged
farfromrefug merged 2 commits into
mainfrom
fix/layout-request-during-layout-and-scrollview-clip
Nov 18, 2026
Merged

farfromrefug merged 2 commits into
mainfrom
fix/layout-request-during-layout-and-scrollview-clip

Conversation

@farfromrefug

@farfromrefug farfromrefug commented Nov 17, 2026 •

Copy link
Copy Markdown

Summary

  • ViewBase.requestLayout no longer throws this.parent.requestLayout is not a function when the parent has no layout to request (the parent of a Span is a FormattedString). It threw when a layout request recorded while suspended was replayed (requestlayoutIfNeeded), which broke the preparation of collection view cells and made UIKit assert on the missing cell.
  • ScrollView.clipToBounds (iOS clipsToBounds, Android clipChildren), default true: lets the content draw over the edges of the scroll view (an inset page, a view which goes under the safe area). It was always clipped on iOS.

Testing

Found in a Svelte app on the iOS 27 simulator (collection view lists rotated while pages are navigated); the stack of the JS error pointed at ViewBase.performLayout. Not yet verified with a full rebuild of the app against this branch; the Android side of clipToBounds is not tested. tsc still reports the two existing _rippleForeground / _borderForeground errors of index.android.ts.

farfromrefug and others added 2 commits November 18, 2026 09:37
`clipToBounds="false"` lets the content of a scroll view draw over its edges (iOS: `clipsToBounds`,
Android: `clipChildren`). It was always clipped on iOS.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A Span updated while its layout requests were suspended replays the request (requestlayoutIfNeeded):
its parent is a FormattedString, which is not a view and has no `requestLayout`, so the request threw
"this.parent.requestLayout is not a function". Inside a collection view cell this made the cell
provider fail and UIKit asserted on the missing cell.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@farfromrefug
farfromrefug force-pushed the fix/layout-request-during-layout-and-scrollview-clip branch from d4ad855 to 0c8812c Compare November 18, 2026 08:37
@farfromrefug farfromrefug changed the title fix(core): layout requests during a layout pass, ViewBase without layoutable parent, ScrollView clipToBounds fix(core): ViewBase without layoutable parent, ScrollView clipToBounds Nov 18, 2026
@farfromrefug
farfromrefug marked this pull request as ready for review November 18, 2026 08:45
@farfromrefug
farfromrefug merged commit fafee27 into main Nov 18, 2026
0 of 2 checks passed
@farfromrefug
farfromrefug deleted the fix/layout-request-during-layout-and-scrollview-clip branch November 18, 2026 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant